package com.imooc.service;

import com.imooc.dto.OrderDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface OrderService {

    /**
     * 创建订单.
     */
    OrderDTO create(OrderDTO orderDTO);

    /**
     * 查询某一订单.
     */
    OrderDTO findOne(String orderId);

    /**
     * 查询所有订单列表.
     */
    Page<OrderDTO> findAll(Pageable pageable);

    /**
     * 根据买家openid查看订单列表.
     */
    Page<OrderDTO> findAll(String buyerOpenid, Pageable pageable);

    /**
     * 完结订单.
     */
    OrderDTO finish(String orderId);

    /**
     * 取消订单.
     */
    OrderDTO cancel(OrderDTO orderDTO);

}
